<% form_remote_tag :url => {:action => 'update_small_group_fields', :id => @group.id } do %>

<% @taggings = Tagging.find_by_tag_name("Group Level") %>
<% @people = @taggings.collect {|p| p.person}.reject {|z| z.nil?}.uniq.sort_by {|n| [n.last_name,n.first_name]} %>

<div style="float:none;clear:both;">
	
	<div id="blurb">
		<label>Blurb:</label><br>
		<%= text_area 'group', 'blurb', :rows => 3, :cols => 74 %>
	</div>
	
	<div id="left-column" style="width:48%">
				<p><label>Small Group Leader</label><br>
		<% if @people.length > 0 %>
		<%= collection_select 'group', 'small_group_leader_id', @people, 'id', 'full_name', options = {:prompt => "--select a person--", :include_blank => true } %>
		<% end %>
		</p>
		
	
		<p><label>Special Requirement:</label><br>
		<%= text_field_with_auto_complete :special_requirement, :name, :value => @group.special_requirement_value %></p>
	
		<p><label>Curriculum:</label><br>
		<%= text_field_with_auto_complete :curriculum_choice, :name, :value => @group.curriculum_choice_value %></p>
	
		<p><label>Curriculum Cost:</label><br>
		<%= text_field_with_auto_complete :curriculum_cost, :name, :value => @group.curriculum_cost_value %></p>
	
		<p><label>Attendance Requirement:</label><br>
		<%= text_field_with_auto_complete :attendance_requirement, :name, :value => @group.attendance_requirement_value %></p>
	
		<p><label>Is Childcare Provided?:</label><br>
		<%= text_field_with_auto_complete :is_childcare_provided, :name, :value => @group.is_childcare_provided_value %></p>
	
		<p><label>Meeting Cadence:</label><br>
		<%= text_field_with_auto_complete :meeting_cadence, :name, :value => @group.meeting_cadence_value %></p>
	</div>
	
	<div id="right-column" style="width:48%">
		<p><label>Leader Name for Printing:</label><br>
		<%= text_field_with_auto_complete :leader_name_for_printing, :name, :value => @group.leader_name_for_printing_value %></p>
		
		<p><label>Meeting Place Name:</label><br>
		<%= text_field_with_auto_complete :meeting_place, :name, :value => @group.meeting_place_value %></p>
		
		<div id="show-meeting-household">
			<%= render :partial => "show_meeting_household", :locals => {:group => @group} %>
		</div>
		<div id="choose-meeting-household">
			<%= render :partial => "chooser_link", :locals => {:group => @group} %>
		</div>
		
		<p><label>Closed Group?</label><br>
			<%= check_box :group, :closed %></p>
		
		<p><label>Meets On:</label><br>
			<%= select ('group', 'meets_on', Group::MEETING_DAYS, {}) %></p>
		
		<p><label>Time From -Until</label><br>
			<span id="time-spot">
				<%= render :partial => "time_setter", :locals => {:group => @group} %>
			</span>
			</p>
	</div>
	
</div>

<div style="float:none;clear:both;">
	<span>
		<%= submit_tag "Save Changes" %>
		<% end %>
	</span>
	<span>
		<%= link_to_remote "cancel", :url => {:action => 'cancel_edit', :group_id => @group.id} %>
	</span>
</div>